import request from '@/utils/request'

// 培训计划接口
export function getTrainingPlanList(params) {
  return request({
    url: '/training/plan/list',
    method: 'get',
    params
  })
}

export function createTrainingPlan(data) {
  return request({
    url: '/training/plan/create',
    method: 'post',
    data
  })
}

export function updateTrainingPlan(data) {
  return request({
    url: '/training/plan/update',
    method: 'put',
    data
  })
}

export function deleteTrainingPlan(id) {
  return request({
    url: `/training/plan/delete/${id}`,
    method: 'delete'
  })
}

// 培训记录接口
export function getTrainingRecordList(params) {
  return request({
    url: '/training/record/list',
    method: 'get',
    params
  })
}

export function createTrainingRecord(data) {
  return request({
    url: '/training/record/create',
    method: 'post',
    data
  })
}

export function updateTrainingRecord(data) {
  return request({
    url: '/training/record/update',
    method: 'put',
    data
  })
}

export function deleteTrainingRecord(id) {
  return request({
    url: `/training/record/delete/${id}`,
    method: 'delete'
  })
}

// 培训评估接口
export function getTrainingEvaluationList(params) {
  return request({
    url: '/training/evaluation/list',
    method: 'get',
    params
  })
}

export function createTrainingEvaluation(data) {
  return request({
    url: '/training/evaluation/create',
    method: 'post',
    data
  })
}

export function updateTrainingEvaluation(data) {
  return request({
    url: '/training/evaluation/update',
    method: 'put',
    data
  })
}

export function deleteTrainingEvaluation(id) {
  return request({
    url: `/training/evaluation/delete/${id}`,
    method: 'delete'
  })
}

// 培训讲师接口
export function getTrainerList(params) {
  return request({
    url: '/training/trainer/list',
    method: 'get',
    params
  })
}

export function createTrainer(data) {
  return request({
    url: '/training/trainer/create',
    method: 'post',
    data
  })
}

export function updateTrainer(data) {
  return request({
    url: '/training/trainer/update',
    method: 'put',
    data
  })
}

export function deleteTrainer(id) {
  return request({
    url: `/training/trainer/delete/${id}`,
    method: 'delete'
  })
}